﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1_LogCenter
{
    class Program
    {
        private static readonly ILog _log = LogManager.GetLogger(typeof(Program));

        static void Main(string[] args)
        {
            for (int i = 0; i < 1000; i++)
            {   
                try
                {
                    var m = "1";

                    var result = 100 / Convert.ToInt32(m);
                    _log.Info("我要开始记录日志啦");

                }
                catch (Exception ex)
                {
                    _log.Error("调用失败" + i, ex);
                    //_log.Info("调用失败" + i, ex);
                    //Console.WriteLine(i);
                }
            }

            Console.Read();
        }
    }
}
